from rest_framework import routers

from students.views import ClassView, StudentView, download_excel_temp
from django.urls import path

urlpatterns = [
    #下载学生信息模板
    path('students/download', download_excel_temp),
    #获取学生的点名信息
    path('students/roll-call',StudentView.as_view({
        'get':'getStudentsRollCall'
    }))
]

router = routers.DefaultRouter(trailing_slash=False)  # 取消url地址后面的 /
# 班级的增删改查
router.register('classes', ClassView, basename='class')
#学生的增删改查
router.register('students', StudentView, basename='students')
urlpatterns += router.urls
